export type objectAny={
    [propName: string]: any;
};


export type goToPageRule={
    path:string,
    navType:'push'|'pushTab'|'replaceAll'|'replace',
    params?:objectAny
}

export type mySchoolRule={
    school_name: string;
    _id: string;
    enable_status: boolean;
    description: string;
    city_code:string;
    city_id_array:Array<{
        text:string;
        value:string
    }>
}

export type mySendTimeRule={
    _id:string;
    alias_first_time:string;
    school_id:string;
    send_date:string;
    alias_name:string;
    splice_time:Array<number>;
    checked?:{
        value:number;
        max:number;
        min:number;
        text:string;
        alias_text?:string
    };
    splice_time_text:Array<{
        value:number;
        max:number;
        min:number;
        text:string;
        alias_text?:string
    }>
}

export type myTipsMoneyRule={
    _id:string;
    school_id:string;
    enable:boolean;
    money:string
}

export type PackCategoriesRule=Array<{
    pack_title:string;
    pack_desc:string;
    moeny:string;
    pack_type:number;
    _id:string;
    add_money:string
}>

export type deliveryTimeChildRule={
    checked?: boolean;
    text:string;
    start_ms:number;
    showName:string;
    end_ms:number
}
export type deliveryTimeRule=Array<{
    showName:string;
    name:string;
    list:Array<deliveryTimeChildRule>
}>

export type foodTakeoutNameRule=`foodTakeout`;
export type foodTakeoutTableRule=`food-order-list`;

export type runErrandNameRule=`runErrand`;
export type runErrandTableRule=`admin-order-list`;

export type moduleTypeRule=foodTakeoutNameRule|runErrandNameRule

export type selectModuleRule=Array<{
    value:moduleTypeRule,
    text:string
}>
export type queryWhereRule={
    pageSize?:number;
    lastCreateDate?:number;
    schoolId?:string;
    status?:string|number;
    module:moduleTypeRule;
    queryToDay?:boolean;
    startTime?:string;
    endTime?:string;
    orderId?:string;
}

export type foodTakeoutOrderStatus={
    order_status:10|6
}
export type runErrandOrderStatus={
    rider_order_status:10|6
}

export type baseToggleTableRule={
    foodTakeout: {
        name:foodTakeoutNameRule,
        tableName:foodTakeoutTableRule;
        getOrderDetails:(orderId:string)=>Promise<any>;
        getOrderList:(queryWhere:queryWhereRule)=>Promise<any>;
        update:{
            order_status:10|6
        }
        buildUpdate:(status:10|6)=>foodTakeoutOrderStatus
    };
    runErrand: {
        name:runErrandNameRule,
        tableName:runErrandTableRule;
        getOrderDetails:(orderId:string)=>Promise<any>;
        getOrderList:(queryWhere:queryWhereRule)=>Promise<any>;
        buildUpdate:(status:10|6)=>runErrandOrderStatus
        update:{
            rider_order_status:10|6
        }
    };
}